import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.swing.UIManager;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.xml.sax.SAXException;

import net.sf.jxls.reader.ReaderBuilder;
import net.sf.jxls.reader.XLSReadStatus;
import net.sf.jxls.reader.XLSReader;
import cn.com.view.MainFrame;
import domain.Gdzc;


public class main {

	
	/**
	 * 主方法
	 * @param args
	 */
	
public static void main(String[] args) {
	MainFrame.open();
	try {
		UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
	} catch (Exception e) {
		e.printStackTrace();
	}
	}


private void readData(String path) {
	// TODO Auto-generated method stub
	InputStream inputXML = new BufferedInputStream(getClass().getResourceAsStream("gdzc.xml"));  
	XLSReader mainReader;
	try {
		mainReader = ReaderBuilder.buildFromXML( inputXML );
		InputStream inputXLS = new BufferedInputStream(getClass().getResourceAsStream("固定资产导入样表.xls"));  
		Gdzc gdzc = new Gdzc();  
		// Department hrDepartment = new Department();  
		List gdzcs = new ArrayList();  
		Map beans = new HashMap();  
		//beans.put("gdzc", gdzc);  
		beans.put("gdzcs", gdzcs);  
		XLSReadStatus readStatus = mainReader.read( inputXLS, beans); 
		List andy=readStatus.getReadMessages();
		System.out.println(andy);
	} catch (IOException e) {
		e.printStackTrace();
	} catch (SAXException e) {
		e.printStackTrace();
	} catch (InvalidFormatException e) {
		e.printStackTrace();
	}  
}

}
